

<%@ page import="org.gtesoreria.Adelanto" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'adelanto.label', default: 'Adelanto')}" />
        <title><g:message code="default.create.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="nav" style="display:none">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
            <span class="menuButton"> <g:link class="afiliados" action="home" controller="afiliado">Afiliados</g:link></span>
            <span class="menuButton"><g:link class="afiliadoBoton" controller="afiliado" action="show" id="${adelantoInstance?.afiliado?.id}">${adelantoInstance?.afiliado?.apellidoNombre}</g:link></span>
            <g:def var="afiliadoId" value="${fieldValue(bean: adelantoInstance?.afiliado, field: 'id')}"/>
            <span class="menuButton"><g:link class="adelantos" controller="adelanto" action="adelantos" params="[afiliadoId:afiliadoId]">Adelantos</g:link></span>

        </div>
        <div class="body">
            <h1>Crear un Adelanto para ${adelantoInstance?.afiliado?.apellidoNombre }</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${adelantoInstance}">
            <div class="errors">
                <g:renderErrors bean="${adelantoInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form action="save" >
            
             <!-- Start Render the adelanto template (_adelanto.gsp) here -->
                <g:render template="adelanto" model="['adelantoInstance':adelantoInstance]"/>
                <!-- End Render the adelanto template (_adelanto.gsp) here -->
                    <div class="buttons">
                	<g:hiddenField name="afiliadoId" value="${adelantoInstance?.afiliado?.id}"/>
                    <span class="button"><g:submitButton name="create" class="save" value="${message(code: 'default.button.create.label', default: 'Create')}" /></span>
                </div>
            </g:form>
        </div>
    </body>
     
</html>
